OffsetValueMap

導入

v1.0

カテゴリ

animmixer

詳細

クリップの値マップをオフセットします。 指定したグローバル時間に、ひとつのアクション アイテムがアクティブである必要があります。 アクションのオフセットは、頻繁に実行するタスクです。 たとえば、元々アクションが定義されていた場所とは異なる場所でアニメーションが発生するよう、アクションをローカル空間でオフセットすることがあります。

スクリプト構文

OffsetValueMap( [InputObjs], [Type], [Time], [Value] );

パラメータ

パラメータ タイプ 詳細
InputObjs 文字列 アニメート可能なパラメータのリスト

デフォルト値:現在マーキングされ、選択されているオブジェクト

タイプ siEffectInputType 考えられる入力の種類

デフォルト値: siSelectedParams

指定可能な値:

説明:

siSelectedParams 選択したパラメータを扱います。InputObjsはパラメータのリストである必要があります。
siAllParamsInClip クリップのすべてのパラメータを扱います。InputObjsはクリップである必要があります。
siPoseOffsetClip クリップのポーズオフセットを計算します。InputObjsはクリップである必要があります。
Time ダブル フレーム番号

デフォルト値: 現在のフレーム。

Number オフセットの値

デフォルト値: 各パラメータの現在の値 この引数を使用することはほとんどありません。

VBScript の例

' Create an animation with a cone translated along the x axis
set oCone = CreatePrim( "Cone", "MeshSurface" )
SaveKey oCone & ".kine.local.posx", 5, 0
SaveKey oCone & ".kine.local.posx", 30, 5 
set oAction = StoreAction( oCone, "/kine.local.pos", 2, "testStoredAction" )
AddClip "Scene_Root", oAction, , , 10
' See what value of the x translation we get at frame 20
' with the original clip.
actualVal = GetValue( oCone & ".kine.local.posx", 20 )
LogMessage "Pre-offset, posx is: " & actualVal
' Offset the translation in x. Starts further from the left
OffsetValueMap oCone & ".kine.local.posx", siSelectedParams, 20, -5
' Confirm that indeed at frame 20 the result (using the
' offset we just set) is what we told it to be: -5.
actualVal = GetValue( oCone & ".kine.local.posx", 20 )
if abs( actualVal - -5 ) < 1e-9 then
        LogMessage "Expected -5 and got it...the universe makes sense!"
else
        LogMessage "Expected -5, but got " & actualVal
end if

関連項目

SaveActionKey